package com.Service.Impl;

import com.Service.UserService;
import com.entity.User;
import com.mapper.DaoImpl.UserMapperImpl;
import com.mapper.UserMapper;

public class UserServiceImpl implements UserService {

    private UserMapper userMapper = new UserMapperImpl();

    @Override
    public User checkUser(String username, String password) {
        User user = userMapper.checkUser(username, password);
        if (user == null) {
            throw new RuntimeException("账号密码错误");
        }
        return userMapper.checkUser(username, password);
    }

    @Override
    public void editHeadImg(User user_in_session) {
        userMapper.editHeadImg(user_in_session);
    }
}
